/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entityBeans;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author allankv
 */
@Entity
@Table(name = "surroundingsculture")
@NamedQueries({
    @NamedQuery(name = "Surroundingsculture.findAll", query = "SELECT s FROM Surroundingsculture s"),
    @NamedQuery(name = "Surroundingsculture.findByIdsurroundingsculture", query = "SELECT s FROM Surroundingsculture s WHERE s.idsurroundingsculture = :idsurroundingsculture"),
    @NamedQuery(name = "Surroundingsculture.findBySurroundingsculture", query = "SELECT s FROM Surroundingsculture s WHERE s.surroundingsculture = :surroundingsculture")})
public class Surroundingsculture implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idsurroundingsculture")
    private Integer idsurroundingsculture;
    @Column(name = "surroundingsculture")
    private String surroundingsculture;
    @OneToMany(mappedBy = "surroundingsculture", fetch = FetchType.LAZY)
    private List<Monitoring> monitoringList;

    public Surroundingsculture() {
    }

    public Surroundingsculture(Integer idsurroundingsculture) {
        this.idsurroundingsculture = idsurroundingsculture;
    }

    public Integer getIdsurroundingsculture() {
        return idsurroundingsculture;
    }

    public void setIdsurroundingsculture(Integer idsurroundingsculture) {
        this.idsurroundingsculture = idsurroundingsculture;
    }

    public String getSurroundingsculture() {
        return surroundingsculture;
    }

    public void setSurroundingsculture(String surroundingsculture) {
        this.surroundingsculture = surroundingsculture;
    }

    public List<Monitoring> getMonitoringList() {
        return monitoringList;
    }

    public void setMonitoringList(List<Monitoring> monitoringList) {
        this.monitoringList = monitoringList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idsurroundingsculture != null ? idsurroundingsculture.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Surroundingsculture)) {
            return false;
        }
        Surroundingsculture other = (Surroundingsculture) object;
        if ((this.idsurroundingsculture == null && other.idsurroundingsculture != null) || (this.idsurroundingsculture != null && !this.idsurroundingsculture.equals(other.idsurroundingsculture))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entityBeans.Surroundingsculture[idsurroundingsculture=" + idsurroundingsculture + "]";
    }

}
